<?php
require_once 'EZend/Controller/WebBaseController.php';

class IndexController extends WebBaseController {
	
	public function indexAction() {
		$this->view->assign('navigates', $this->getCmsArticleService()->listTopCategories());
		$this->view->assign('articles', $this->getCmsArticleService()->listInPage(1, 7));
	}
	
	
	private function getCmsArticleService() {
		require_once 'Models/Cms/Service/CmsServiceFactory.php';
		return CmsServiceFactory::getInstance()->createCmsArticleService();
	}
}





